package com.yoyo.web.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.yoyo.biz.UserBiz;
import com.yoyo.entity.User;

@Controller
public class TestAction {
	
	@Resource
	private UserBiz userbiz;
	private List<User> users;
	private User user;
	
	public UserBiz getuserbiz() {
		return userbiz;
	}

	public void setuserbiz(UserBiz userbiz) {
		this.userbiz = userbiz;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String TestUser(){
		users = userbiz.findAll();
		return "json";
	}
	
	public String getItem(){
		user = userbiz.find(user.getId());
		return "json";
	}

}
